#ifndef _DS1302_H_
#define _DS1302_H_

#define Second_W 0x80
#define Second_R 0x81
#define Minute_W 0x82
#define Minute_R 0x83
#define Hour_W 0x84
#define Hour_R 0x85
#define Date_W 0x86
#define Date_R 0x87
#define Month_W 0x88
#define Month_R 0x89
#define Day_W 0x8A
#define Day_R 0x8B
#define Year_W 0x8C
#define Year_R 0x8D
#define DS1302_WP_W 0x8E
#define DS1302_WP_R 0x8F

extern unsigned char Time[]; //{Second,Minute,Hour,Date,Month,Day,Year}

void DS1302_Init();
void DS1302_WriteByte(unsigned char Command,unsigned char Data);
unsigned char DS1302_ReadByte(unsigned char Command);
void DS1302_ReadTime();
void DS1302_SetTime();
#endif